Skip to content

Example of a ForceField implemented with JAX#557

Merged
hugtalbot merged 8 commits intosofa-framework:masterfrom
leobois67:jax-forcefield-example
Feb 25, 2026
Merged

Example of a ForceField implemented with JAX#557
hugtalbot merged 8 commits intosofa-framework:masterfrom
leobois67:jax-forcefield-example

Conversation

@leobois67
Copy link
Contributor

Illustrates how to leverage JAX autodiff to implement the methods 'addDForce()' and 'addKToMatrix()' automatically.
This example shows a set of particles attached to the origin with a simple spring.

I included a few options for the scene, that might be unnecessary:

  • time integration and linear solver, to illustrate that not all combinations require all methods to be implemented
  • number of particles, to show how computational cost and memory requirement scale (important here since the jacobian computed by JAX is dense)
  • SOFA built-in alternative for comparison

@leobois67
Copy link
Contributor Author

Note: it requires JAX to run

@bakpaul
Copy link
Contributor

bakpaul commented Nov 13, 2025

Sorry, but I get a segfault while running it at the very first timestep.

terminate called after throwing an instance of 'pybind11::type_error'
  what():  Can't read return value of AddKToMatrix. A numpy array is expected

@leobois67
Copy link
Contributor Author

I believe this example stopped working after this commit 5029c050f68078ab5173d1ffcace69598caa7f8b by @alxbilger.

I don’t know exactly how things worked before, but now when I try to fix it, (1) I have to add an extra dimension to enter the correct if statement, so the KMatrix has shape (n, n, 1), and (2) it is super slow. I will look into it.

@alxbilger
Copy link
Contributor

alxbilger commented Nov 13, 2025

@leobois67 you're probably right about my commit. However, I don't understand how it could work before. I suspect that the matrix was not filled with your Python force field. This hypothesis is strenghened by the fact that it is slower now. Is it possible?

@leobois67
Copy link
Contributor Author

@alxbilger I agree that it probably did not work as it was supposed to. The matrix that was passed was not a numpy array but a jax array, with shape (n, 3, n, 3), so I don’t know how it was processed, but I guess it was silently ignored.

Also, it is the processing of the matrix that is slow, not its computation: returning a dense matrix full of zeros seems to be just as slow. Is there a way to improve that?

@alxbilger
Copy link
Contributor

In the code in 5029c05, each mat->add is time consuming. It is best to reduce the number of calls. You can try to test if the value is non-zero before calling mat->add.

@leobois67
Copy link
Contributor Author

I think I got something that works relatively well, by returning only the non-zero values as you suggested. I left the code that returns the dense matrix for people who don’t have a big sparse jacobian.

To give you an idea of the impact on the performances, here are some stats with the simulation of 1000 independent particles:

  • SOFA force field: ~1300 FPS
  • JAX force field, sparse jacobian, optimized: ~390 FPS on GPU, ~40 FPS on CPU
  • JAX force field, sparse jacobian, not optimized: ~120 FPS on GPU, ~7 FPS on CPU
  • JAX force field, dense jacobian: ~7 FPS on GPU and CPU

By "sparse jacobian" I mean returning only the non-zero values; by "optimized" I refer to an optimization I mention in the code, that leverages the knowledge of the sparsity of the jacobian; by "GPU"/"CPU" I refer to the device JAX uses.

Also, most of the time spent in addKToMatrix() is spent in the conversion of the JAX array (typically on GPU) to the numpy array (on CPU): about 90% of the time for the 390 FPS case. I guess JAX would be even better if it could share data with SOFA directly on the GPU. Is this something doable?

@alxbilger
Copy link
Contributor

@leobois67 thanks for the benchmark. I don't know JAX enough to answer your question. I can tell that in C++/CUDA, we manipulate a raw pointer, whether the data are on the CPU or on the GPU. We would need a way to communicate the memory location of this data to JAX somehow. Don't know if that's possible

@hugtalbot hugtalbot added the enhancement New feature or request label Dec 4, 2025
@bakpaul
Copy link
Contributor

bakpaul commented Dec 4, 2025

Hello ! I still have a segfault in the buildStifnessMatrix. Could someone else than me try this ? @alxbilger

@hugtalbot
Copy link
Contributor

I ran it on CPU and also have it @bakpaul

########## SIG 11 - SIGSEGV: segfault ##########
  sofa::helper::BackTrace::sig(int)
  sofa::core::behavior::BaseForceField::buildStiffnessMatrix(sofa::core::behavior::StiffnessMatrix*)
  sofa::component::linearsystem::MatrixLinearSystem<sofa::linearalgebra::CompressedRowSparseMatrixMechanical<double, sofa::linearalgebra::CRSMechanicalPolicy>, sofa::linearalgebra::FullVector<double> >::assembleSystem(sofa::core::MechanicalParams const*)::{lambda(sofa::component::linearsystem::MatrixLinearSystem<sofa::linearalgebra::CompressedRowSparseMatrixMechanical<double, sofa::linearalgebra::CRSMechanicalPolicy>, sofa::linearalgebra::FullVector<double> >::IndependentContributors&)#1}::operator()(sofa::component::linearsystem::MatrixLinearSystem<sofa::linearalgebra::CompressedRowSparseMatrixMechanical<double, sofa::linearalgebra::CRSMechanicalPolicy>, sofa::linearalgebra::FullVector<double> >::IndependentContributors&) const
  sofa::component::linearsystem::MatrixLinearSystem<sofa::linearalgebra::CompressedRowSparseMatrixMechanical<double, sofa::linearalgebra::CRSMechanicalPolicy>, sofa::linearalgebra::FullVector<double> >::assembleSystem(sofa::core::MechanicalParams const*)
  sofa::core::behavior::BaseMatrixLinearSystem::buildSystemMatrix(sofa::core::MechanicalParams const*)
  sofa::component::odesolver::backward::EulerImplicitSolver::solve(sofa::core::ExecParams const*, double, sofa::core::TMultiVecId<(sofa::core::VecType)1, (sofa::core::VecAccess)1>, sofa::core::TMultiVecId<(sofa::core::VecType)2, (sofa::core::VecAccess)1>)
  sofa::simulation::SolveVisitor::processSolver(sofa::simulation::Node*, sofa::core::behavior::OdeSolver*)
  void sofa::simulation::Visitor::for_each<sofa::simulation::SolveVisitor, sofa::simulation::Node, sofa::simulation::NodeSequence<sofa::core::behavior::OdeSolver, false>, sofa::core::behavior::OdeSolver>(sofa::simulation::SolveVisitor*, sofa::simulation::Node*, sofa::simulation::NodeSequence<sofa::core::behavior::OdeSolver, false> const&, void (sofa::simulation::SolveVisitor::*)(sofa::simulation::Node*, sofa::core::behavior::OdeSolver*), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
  sofa::simulation::SolveVisitor::processNodeTopDown(sofa::simulation::Node*)
  sofa::simulation::Node::executeVisitorTopDown(sofa::simulation::Visitor*, std::__cxx11::list<sofa::simulation::Node*, std::allocator<sofa::simulation::Node*> >&, std::map<sofa::simulation::Node*, sofa::simulation::Node::StatusStruct, std::less<sofa::simulation::Node*>, std::allocator<std::pair<sofa::simulation::Node* const, sofa::simulation::Node::StatusStruct> > >&, sofa::simulation::Node*)
  sofa::simulation::Node::executeVisitorTopDown(sofa::simulation::Visitor*, std::__cxx11::list<sofa::simulation::Node*, std::allocator<sofa::simulation::Node*> >&, std::map<sofa::simulation::Node*, sofa::simulation::Node::StatusStruct, std::less<sofa::simulation::Node*>, std::allocator<std::pair<sofa::simulation::Node* const, sofa::simulation::Node::StatusStruct> > >&, sofa::simulation::Node*)
  sofa::simulation::Node::doExecuteVisitor(sofa::simulation::Visitor*, bool)
  sofa::simulation::DefaultAnimationLoop::solve(sofa::core::ExecParams const*, double) const
  sofa::simulation::DefaultAnimationLoop::animate(sofa::core::ExecParams const*, double) const
  sofa::simulation::DefaultAnimationLoop::step(sofa::core::ExecParams const*, double)
  sofa::simulation::node::animate(sofa::simulation::Node*, double)
  sofaglfw::SofaGLFWBaseGUI::runLoop(unsigned long)
  sofaglfw::SofaGLFWGUI::mainLoop()
  sofa::gui::common::GUIManager::MainLoop(boost::intrusive_ptr<sofa::simulation::Node>, char const*)
  __libc_start_main

@leobois67 could you please update us on the status on your machine?

@leobois67
Copy link
Contributor Author

I just checked and it still works on my machine, both on CPU and GPU.

To be sure that addKToMatrix() is to blame, have you tried a version without the stiffness matrix assembly?
python3 SofaPython3/examples/jax/forcefield.py --method=implicit-matrix-free
python3 SofaPython3/examples/jax/forcefield.py --method=explicit

@leobois67
Copy link
Contributor Author

You can come to me next time you work on this PR, but in case I am not available, here are some other quick suggestions:

  • Try changing the number of particles to see if something changes: --particles=100 (default 1000)
  • Try one of the other options for addKToMatrix by uncommenting one of them, and commenting the current one. (You may want to lower the number of particles since the other options are slower.)
    One way a segfault could occur is if the matrix that addKToMatrix outputs is bigger than the one expected by the binding. I don’t see a reason for that to happen though.

@hugtalbot
Copy link
Contributor

hugtalbot commented Jan 29, 2026

Is that what we are supposed to see? @leobois67

Screencast.from.2026-01-29.18-59-53.webm

@leobois67
Copy link
Contributor Author

No it's not! Each particle is attached to the origin with a spring, so they should be kind of oscillating like a pendulum + oscillating due to the spring expanding and contracting; which is not what I see in the video.

Maybe try different options to check whether you get the same behavior or not?
E.g.

python3 SofaPython3/examples/jax/forcefield.py --method=explicit --particles=10

@hugtalbot hugtalbot merged commit 4fb7e89 into sofa-framework:master Feb 25, 2026
bakpaul added a commit that referenced this pull request Mar 2, 2026
commit 833bd69
Author: Hugo <hugo.talbot@sofa-framework.org>
Date:   Fri Feb 27 00:40:59 2026 +0100

    [doc] Use sphinx-design in order to fix doc generation (#586)

    Co-authored-by: hugtalbot <hugo.talbot@inria.fr>

commit d982bc8
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Thu Feb 26 23:11:32 2026 +0100

    Remove unappropriate comment (#591)

commit ae7e8e1
Author: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
Date:   Thu Feb 26 18:39:56 2026 +0100

    Ignore the meshing scenes (#587)

commit 6593f34
Author: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
Date:   Thu Feb 26 18:38:58 2026 +0100

    [RPyC] Add new exposed methods to SOFA server (#570)

    * Add a way to init the root remotly

    * Add method to change working dir on remote

commit bdbaece
Author: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
Date:   Thu Feb 26 10:29:37 2026 +0100

    Add python modules that uses the CGAL binding  (#567)

    * Add python modules that uses the CGAL binding instead of the CGALPlugin to generate mesh from a pointcloud or a surfacic polyhedron

    * Add a SOFA scene opening and using the generated mesh with CGAL

    * Sort all files into a meshing repo and add a Gmsh example

    * Make display optionnal

    * Fix typo

    ---------

    Co-authored-by: hugtalbot <hugo.talbot@inria.fr>
    Co-authored-by: Themis Skamagkis <70031729+th-skam@users.noreply.github.com>

commit 617d506
Author: Hugo <hugo.talbot@sofa-framework.org>
Date:   Thu Feb 26 10:29:13 2026 +0100

    [examples] Add a thermo-elastic example (#204)

    * [examples] Add a thermo-elastic example

    * minor comment to remove

    * Get compatible with #198 and add legend

    * Remove option of topo changes

    * Update scene further to recently introduced templates in Mass

    * avoid using strings

    * update scene with imgui, linkpath etc

    ---------

    Co-authored-by: hugtalbot <hugo.talbot@inria.fr>

commit 4fb7e89
Author: leobois67 <leo.bois@inria.fr>
Date:   Wed Feb 25 18:58:24 2026 +0100

    Example of a ForceField implemented with JAX (#557)

    * Add the example

    * Igne jax example on main CI

    * Fix ignoring the jax examples

    * Fix addKToMatrix() with different options

    * Apply suggestions from code review

    ---------

    Co-authored-by: Paul Baksic <paul.baksic@outlook.fr>
    Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>

commit b3a79c6
Author: Hugo <hugo.talbot@sofa-framework.org>
Date:   Wed Feb 25 15:50:54 2026 +0100

    Fix code block indentation for createScene function (#582)

    Updated code block formatting for createScene function.
    This should fix the doc generation

commit fc75967
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Fri Feb 13 03:42:51 2026 +0100

    fix wrong parameter order in addDForce and addKToMatrix (#579)

    * fix wrong parameter order in addDForce

    * also fix addKToMatrix

commit ca2be7c
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Fri Feb 13 03:42:37 2026 +0100

    Add bindings for prism and pyramid topology functions (#578)

commit 346d298
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Fri Feb 13 03:42:20 2026 +0100

    ordering field is deprecated, use NaturalOrderingMethod instead (#577)

commit 959b4cd
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Fri Feb 13 03:42:02 2026 +0100

    Redirect SOFA logs to Python's sys.stdout using a custom PythonMessageHandler (#576)

    * Redirect SOFA logs to Python's sys.stdout using a custom PythonMessageHandler.

    * cleaning

    * Redirect SOFA logs to Python's sys.stdout using a custom PythonMessageHandler.

commit c0dc30e
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Thu Feb 12 10:43:05 2026 +0100

    Clean getRecords in Timer module (#561)

    * Clean getRecords in Timer module

    * remove extra /**

commit d2ba475
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Wed Feb 4 23:59:52 2026 +0100

    include `sofa/core/fwd.h` instead of the forward declaration (#575)

commit c209f3a
Author: Frederick Roy <fredroy@users.noreply.github.com>
Date:   Wed Feb 4 22:50:20 2026 +0900

    fix mixed-up quote/doublequote, plus consistent quoting (#574)

commit 7760402
Author: Hugo <hugo.talbot@sofa-framework.org>
Date:   Tue Feb 3 08:05:33 2026 +0100

    Generalize use of initRoot (#566)

    Co-authored-by: hugtalbot <hugo.talbot@inria.fr>

commit b29cfe5
Author: Damien Marchal <damien.marchal@univ-lille1.fr>
Date:   Thu Jan 29 20:19:43 2026 +0100

    Remove the implementation of getPathName as it is now in BaseData (#556)

    See: sofa-framework/sofa#5759

    Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>

commit c7fb254
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Thu Jan 29 20:08:22 2026 +0100

    Introduce an example of a custom message handler (#569)

commit f4e90d4
Author: Hugo <hugo.talbot@sofa-framework.org>
Date:   Thu Jan 29 09:00:43 2026 +0100

    Follow lifecycle v26.06 deprecated header (#571)

    Co-authored-by: hugtalbot <hugo.talbot@inria.fr>

commit 8bf0162
Author: Frederick Roy <fredroy@users.noreply.github.com>
Date:   Wed Jan 7 06:48:05 2026 +0900

    remove import of scipy.misc, which is deprecated (#564)

commit 1016b94
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Thu Dec 18 16:37:52 2025 +0100

    Update advanced_timer.py with comments and fix deprecated data (#562)

commit 29c4e87
Author: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
Date:   Tue Dec 16 12:01:32 2025 +0100

    Add example scene using CCDTightInclusion (#559)

    * Add example scene using CCDTightInclusion

    * Replace ProjectedGaussSeidel with BlockGaussSeidel

    * Fix scene error

commit d38d3c4
Author: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
Date:   Fri Dec 12 11:53:20 2025 +0100

    Apply name changing on code and examples (#560)

commit b09d921
Author: Damien Marchal <damien.marchal@univ-lille1.fr>
Date:   Thu Nov 13 15:28:05 2025 +0100

    Add Quaternion to python factory so we can create data field with this type. (#555)

commit a66c054
Author: Damien Marchal <damien.marchal@univ-lille1.fr>
Date:   Thu Nov 13 15:27:48 2025 +0100

    Improve error message when the SetDataFromArray does not match (#554)

    * Improve error message when the SetDataFromArray does not match

    * Apply suggestions from code review

    ---------

    Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>

commit 746745c
Author: Damien Marchal <damien.marchal@univ-lille1.fr>
Date:   Thu Nov 13 15:27:28 2025 +0100

    Add context manager behavior to Node() (#545)

    This allows to use with statment to have good looking indentation in sofa scene.
    eg:
    with Node("YOLO") as w:
    	w.addObject("YY")

commit af98611
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Thu Nov 13 15:25:55 2025 +0100

    Support more types of linear systems (#542)

    * Support more types of linear systems

    * add support for BTD

commit ae6b330
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Thu Nov 13 10:35:28 2025 +0100

    add missing required plugin in test (#558)

commit 6ef05ed
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Tue Nov 11 14:34:26 2025 +0100

    Fix binding after #5648 (#528)

    Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>

commit 5029c05
Author: Alex Bilger <alxbilger@users.noreply.github.com>
Date:   Thu Nov 6 10:24:24 2025 +0100

    Add validation for numpy array as return type in AddKToMatrix bindings (#541)

    * Add validation for numpy array as return type in AddKToMatrix bindings

    * Refactor AddKToMatrix return type validation and simplify conditional checks

commit 8ba1e2c
Author: Damien Marchal <damien.marchal@univ-lille1.fr>
Date:   Thu Oct 30 16:06:25 2025 +0100

    Register in the PythonFactory Rigid3::Coord (#544)

    Because currently only Rigid3::VecCoord was supported.

commit 72ed0e6
Author: Damien Marchal <damien.marchal@univ-lille1.fr>
Date:   Thu Oct 30 16:06:16 2025 +0100

    Add proper return value to event overriden in python (#543)

    Currently the controllers implemented in python cannot report the the event processing
    system in sofa that there is no need anymore to process the event.

    The PR allows to do. Every onXXXXXX() that implement an event processor can no return a value.
    If it is None or False then processing of event use this to continue the propagation
    If it is True (aka: has been processed/no more further), then the SOFA system will not proposed to other component to process the same event
bakpaul added a commit to bakpaul/SofaPython3 that referenced this pull request Mar 2, 2026
commit 539badc
Author: bakpaul <paul.baksic@outlook.fr>
Date:   Mon Mar 2 09:10:20 2026 +0100

    Squashed commit of the following:

    commit 833bd69
    Author: Hugo <hugo.talbot@sofa-framework.org>
    Date:   Fri Feb 27 00:40:59 2026 +0100

        [doc] Use sphinx-design in order to fix doc generation (sofa-framework#586)

        Co-authored-by: hugtalbot <hugo.talbot@inria.fr>

    commit d982bc8
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Thu Feb 26 23:11:32 2026 +0100

        Remove unappropriate comment (sofa-framework#591)

    commit ae7e8e1
    Author: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
    Date:   Thu Feb 26 18:39:56 2026 +0100

        Ignore the meshing scenes (sofa-framework#587)

    commit 6593f34
    Author: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
    Date:   Thu Feb 26 18:38:58 2026 +0100

        [RPyC] Add new exposed methods to SOFA server (sofa-framework#570)

        * Add a way to init the root remotly

        * Add method to change working dir on remote

    commit bdbaece
    Author: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
    Date:   Thu Feb 26 10:29:37 2026 +0100

        Add python modules that uses the CGAL binding  (sofa-framework#567)

        * Add python modules that uses the CGAL binding instead of the CGALPlugin to generate mesh from a pointcloud or a surfacic polyhedron

        * Add a SOFA scene opening and using the generated mesh with CGAL

        * Sort all files into a meshing repo and add a Gmsh example

        * Make display optionnal

        * Fix typo

        ---------

        Co-authored-by: hugtalbot <hugo.talbot@inria.fr>
        Co-authored-by: Themis Skamagkis <70031729+th-skam@users.noreply.github.com>

    commit 617d506
    Author: Hugo <hugo.talbot@sofa-framework.org>
    Date:   Thu Feb 26 10:29:13 2026 +0100

        [examples] Add a thermo-elastic example (sofa-framework#204)

        * [examples] Add a thermo-elastic example

        * minor comment to remove

        * Get compatible with sofa-framework#198 and add legend

        * Remove option of topo changes

        * Update scene further to recently introduced templates in Mass

        * avoid using strings

        * update scene with imgui, linkpath etc

        ---------

        Co-authored-by: hugtalbot <hugo.talbot@inria.fr>

    commit 4fb7e89
    Author: leobois67 <leo.bois@inria.fr>
    Date:   Wed Feb 25 18:58:24 2026 +0100

        Example of a ForceField implemented with JAX (sofa-framework#557)

        * Add the example

        * Igne jax example on main CI

        * Fix ignoring the jax examples

        * Fix addKToMatrix() with different options

        * Apply suggestions from code review

        ---------

        Co-authored-by: Paul Baksic <paul.baksic@outlook.fr>
        Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>

    commit b3a79c6
    Author: Hugo <hugo.talbot@sofa-framework.org>
    Date:   Wed Feb 25 15:50:54 2026 +0100

        Fix code block indentation for createScene function (sofa-framework#582)

        Updated code block formatting for createScene function.
        This should fix the doc generation

    commit fc75967
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Fri Feb 13 03:42:51 2026 +0100

        fix wrong parameter order in addDForce and addKToMatrix (sofa-framework#579)

        * fix wrong parameter order in addDForce

        * also fix addKToMatrix

    commit ca2be7c
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Fri Feb 13 03:42:37 2026 +0100

        Add bindings for prism and pyramid topology functions (sofa-framework#578)

    commit 346d298
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Fri Feb 13 03:42:20 2026 +0100

        ordering field is deprecated, use NaturalOrderingMethod instead (sofa-framework#577)

    commit 959b4cd
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Fri Feb 13 03:42:02 2026 +0100

        Redirect SOFA logs to Python's sys.stdout using a custom PythonMessageHandler (sofa-framework#576)

        * Redirect SOFA logs to Python's sys.stdout using a custom PythonMessageHandler.

        * cleaning

        * Redirect SOFA logs to Python's sys.stdout using a custom PythonMessageHandler.

    commit c0dc30e
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Thu Feb 12 10:43:05 2026 +0100

        Clean getRecords in Timer module (sofa-framework#561)

        * Clean getRecords in Timer module

        * remove extra /**

    commit d2ba475
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Wed Feb 4 23:59:52 2026 +0100

        include `sofa/core/fwd.h` instead of the forward declaration (sofa-framework#575)

    commit c209f3a
    Author: Frederick Roy <fredroy@users.noreply.github.com>
    Date:   Wed Feb 4 22:50:20 2026 +0900

        fix mixed-up quote/doublequote, plus consistent quoting (sofa-framework#574)

    commit 7760402
    Author: Hugo <hugo.talbot@sofa-framework.org>
    Date:   Tue Feb 3 08:05:33 2026 +0100

        Generalize use of initRoot (sofa-framework#566)

        Co-authored-by: hugtalbot <hugo.talbot@inria.fr>

    commit b29cfe5
    Author: Damien Marchal <damien.marchal@univ-lille1.fr>
    Date:   Thu Jan 29 20:19:43 2026 +0100

        Remove the implementation of getPathName as it is now in BaseData (sofa-framework#556)

        See: sofa-framework/sofa#5759

        Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>

    commit c7fb254
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Thu Jan 29 20:08:22 2026 +0100

        Introduce an example of a custom message handler (sofa-framework#569)

    commit f4e90d4
    Author: Hugo <hugo.talbot@sofa-framework.org>
    Date:   Thu Jan 29 09:00:43 2026 +0100

        Follow lifecycle v26.06 deprecated header (sofa-framework#571)

        Co-authored-by: hugtalbot <hugo.talbot@inria.fr>

    commit 8bf0162
    Author: Frederick Roy <fredroy@users.noreply.github.com>
    Date:   Wed Jan 7 06:48:05 2026 +0900

        remove import of scipy.misc, which is deprecated (sofa-framework#564)

    commit 1016b94
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Thu Dec 18 16:37:52 2025 +0100

        Update advanced_timer.py with comments and fix deprecated data (sofa-framework#562)

    commit 29c4e87
    Author: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
    Date:   Tue Dec 16 12:01:32 2025 +0100

        Add example scene using CCDTightInclusion (sofa-framework#559)

        * Add example scene using CCDTightInclusion

        * Replace ProjectedGaussSeidel with BlockGaussSeidel

        * Fix scene error

    commit d38d3c4
    Author: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
    Date:   Fri Dec 12 11:53:20 2025 +0100

        Apply name changing on code and examples (sofa-framework#560)

    commit b09d921
    Author: Damien Marchal <damien.marchal@univ-lille1.fr>
    Date:   Thu Nov 13 15:28:05 2025 +0100

        Add Quaternion to python factory so we can create data field with this type. (sofa-framework#555)

    commit a66c054
    Author: Damien Marchal <damien.marchal@univ-lille1.fr>
    Date:   Thu Nov 13 15:27:48 2025 +0100

        Improve error message when the SetDataFromArray does not match (sofa-framework#554)

        * Improve error message when the SetDataFromArray does not match

        * Apply suggestions from code review

        ---------

        Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>

    commit 746745c
    Author: Damien Marchal <damien.marchal@univ-lille1.fr>
    Date:   Thu Nov 13 15:27:28 2025 +0100

        Add context manager behavior to Node() (sofa-framework#545)

        This allows to use with statment to have good looking indentation in sofa scene.
        eg:
        with Node("YOLO") as w:
        	w.addObject("YY")

    commit af98611
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Thu Nov 13 15:25:55 2025 +0100

        Support more types of linear systems (sofa-framework#542)

        * Support more types of linear systems

        * add support for BTD

    commit ae6b330
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Thu Nov 13 10:35:28 2025 +0100

        add missing required plugin in test (sofa-framework#558)

    commit 6ef05ed
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Tue Nov 11 14:34:26 2025 +0100

        Fix binding after #5648 (sofa-framework#528)

        Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>

    commit 5029c05
    Author: Alex Bilger <alxbilger@users.noreply.github.com>
    Date:   Thu Nov 6 10:24:24 2025 +0100

        Add validation for numpy array as return type in AddKToMatrix bindings (sofa-framework#541)

        * Add validation for numpy array as return type in AddKToMatrix bindings

        * Refactor AddKToMatrix return type validation and simplify conditional checks

    commit 8ba1e2c
    Author: Damien Marchal <damien.marchal@univ-lille1.fr>
    Date:   Thu Oct 30 16:06:25 2025 +0100

        Register in the PythonFactory Rigid3::Coord (sofa-framework#544)

        Because currently only Rigid3::VecCoord was supported.

    commit 72ed0e6
    Author: Damien Marchal <damien.marchal@univ-lille1.fr>
    Date:   Thu Oct 30 16:06:16 2025 +0100

        Add proper return value to event overriden in python (sofa-framework#543)

        Currently the controllers implemented in python cannot report the the event processing
        system in sofa that there is no need anymore to process the event.

        The PR allows to do. Every onXXXXXX() that implement an event processor can no return a value.
        If it is None or False then processing of event use this to continue the propagation
        If it is True (aka: has been processed/no more further), then the SOFA system will not proposed to other component to process the same event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pr: status ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants